package cn.edu.scau.cmi.wangzm.factory;

import cn.edu.scau.cmi.wangzm.simplefactory.Meat;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;

public class FactoryController {
	@FXML
    private Button button1;
	@FXML
    private Button button2;
	@FXML
    private Button button3;
    @FXML
    private TextArea outputArea;
    @FXML
    void handleOk1(ActionEvent event) {
    	Meat beef =BeefMeatFactory.getMeat();
        outputArea.appendText(beef.cook()+"\n");
    }
    @FXML
    void handleOk2(ActionEvent event) {
        Meat pork =PorkMeatFactory.getMeat();
        outputArea.appendText(pork.cook()+"\n");
    }
    @FXML
    void handleOk3(ActionEvent event) {
        Meat chicken =ChickenMeatFactory.getMeat();
        outputArea.appendText(chicken.cook()+"\n");
    }
}
